﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

using TerryDong.Core;

namespace TerryDong.Bll.Models.xml
{
    public class SettingBase
    {
       static string xmlfilePath = string.Empty;
       static string xmlFileName = string.Empty;
       protected static XmlConfigHelper Setting = null;
       public static void SettingFile(string fileName)
       {
           if (HttpContext.Current!=null)
           {
               xmlfilePath = HttpContext.Current.Request.PhysicalApplicationPath;
           }
           else
           {
               xmlfilePath = AppDomain.CurrentDomain.BaseDirectory;
           }
          
           xmlFileName = @"configrations\"+fileName;
           Setting = new XmlConfigHelper(xmlfilePath + xmlFileName);
       }
    }
}
